import request from '@/utils/request'

export function getList(query) {
  return request({
    url: '/sysm/staff/',
    method: 'get',
    params: query
  })
}

export function saveOrUpdate(param) {
  return request.post('/sysm/staff/', JSON.stringify(param))
}

export function deleteById(id) {
  return request({
    url: `/sysm/staff/${id}`,
    method: 'delete'
  })
}

export function deleteByIds(ids) {
  return request({
    url: `/sysm/staff/deleteList`,
    method: 'delete',
    params: ids
  })
}

export function getListAll(query) {
  return request({
    url: '/sysm/staff/listAll',
    method: 'get',
    params: query
  })
}

// 查询当前部门下的人员
export function getListByDeptId(query) {
  return request({
    url: '/sysm/staff/listAllByDeptCms',
    method: 'get',
    params: query
  })
}
